export const formComponents = [
  { 'name': '输入框', 'icon': 'icon-biaodanzujian-shurukuang', 'type': 'input' },
  { 'name': '数字输入框', 'icon': 'icon-jishuqi', 'type': 'inputNumber' },
  { 'name': '开关', 'icon': 'icon-kaiguan', 'type': 'switch' },
  { 'name': '复选', 'icon': 'icon-biaodankongjianfuxuan', 'type': 'checkbox' },
  { 'name': '单选', 'icon': 'icon-danxuan-yixuan', 'type': 'radio' },
  { 'name': '下拉选择', 'icon': 'icon-xialaxuanze', 'type': 'select' },
  { 'name': '颜色选择器', 'icon': 'icon-yansexuanzeqi', 'type': 'colorPicker' },
  { 'name': '日期选择器', 'icon': 'icon-riqixuanze', 'type': 'datePicker' },
  { 'name': '级联选择器', 'icon': 'icon-jilianxuanze', 'type': 'cascader' },
  { 'name': '评分', 'icon': 'icon-pingfen', 'type': 'rate' },
  { 'name': '滑块', 'icon': 'icon-icon_huakuai', 'type': 'slider' },
  { 'name': '文本域', 'icon': 'icon-wenbenyu', 'type': 'textarea' },
]

export interface formComponentsType {
  _id: string,
  name: string,
  icon: string,
  type: string,
  formItemProps: {
    label: string,
    prop: 'top' | 'right' | 'bottom',
    labelPosition: string,
    labelWidth: string | number,
    placeholder: string,
    required: boolean,
    disabled: boolean,
    allowClear: boolean,
    size: 'lg' | 'md' | 'sm' | 'xs',
    options: any,
    optionsName:string,
    showDots:boolean,
    step: number,
    max:  number,
    min:number,
    validateType:string|null,
    pattern:string|null,
    enumerable:Array<string|''>,
    validateMsg:string,
  }
}

export interface formPropsType {
  name: string,
  requiredIcons: string,
  model: string,
  rules: string,
}